Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix v1beta1 pipelineref bundle conversion to resolver #6791

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Jun 7, 2023

This should be backported to v0.41, v0.44, v0.47

Changes

This commit fixes the bundle conversion for PipelineRef which should
be converting to the bundle Resolver with a Pipeline kind. It also adds
the conversion integration tests for the bundle logics to prevent such
error. It extracts the setup for bundle and makes it into a helper function.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • [n/a] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • [n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • [n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 7, 2023
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. labels Jun 7, 2023
@JeromeJu JeromeJu force-pushed the fix-pipelineref-conversion branch from d7feae8 to 0d88181 Compare June 8, 2023 13:31
@JeromeJu JeromeJu marked this pull request as ready for review June 8, 2023 13:32
@tekton-robot tekton-robot requested a review from wlynch June 8, 2023 13:32
@JeromeJu JeromeJu changed the title [WIP] Fix pipelineref bundle conversion Fix v1beta1 pipelineref bundle conversion to resolver Jun 8, 2023
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2023
test/conversion_test.go Outdated Show resolved Hide resolved
test/conversion_test.go Outdated Show resolved Hide resolved
@JeromeJu JeromeJu force-pushed the fix-pipelineref-conversion branch from 0d88181 to 359cd1b Compare June 8, 2023 13:49
@JeromeJu JeromeJu force-pushed the fix-pipelineref-conversion branch from 359cd1b to d60af7d Compare June 8, 2023 14:42
test/conversion_test.go Outdated Show resolved Hide resolved
test/tektonbundles_test.go Outdated Show resolved Hide resolved
test/tektonbundles_test.go Show resolved Hide resolved
test/tektonbundles_test.go Show resolved Hide resolved
@JeromeJu JeromeJu force-pushed the fix-pipelineref-conversion branch 3 times, most recently from f2485b9 to b711779 Compare June 8, 2023 15:16
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 8, 2023
test/conversion_test.go Outdated Show resolved Hide resolved
test/conversion_test.go Outdated Show resolved Hide resolved
test/conversion_test.go Outdated Show resolved Hide resolved
test/conversion_test.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lbernick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 8, 2023
This commit fixes the bundle conversion for PipelineRef which should
be converting to the bundle Resolver with a Pipeline kind. It also adds
the conversion integration tests for the bundle logics to prevent such
error. It extracts the setup for bundle and makes it into a helper function.
@JeromeJu JeromeJu force-pushed the fix-pipelineref-conversion branch from 1fe3ae1 to 4be91ca Compare June 8, 2023 16:46
Copy link
Member

@Yongxuanzhang Yongxuanzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2023
@tekton-robot tekton-robot merged commit 01fb796 into tektoncd:main Jun 8, 2023
@JeromeJu
Copy link
Member Author

JeromeJu commented Jun 8, 2023

/cherry-pick release-v0.41.x

@JeromeJu
Copy link
Member Author

JeromeJu commented Jun 8, 2023

/cherry-pick release-v0.44.x

@JeromeJu
Copy link
Member Author

JeromeJu commented Jun 9, 2023

/cherry-pick release-v0.41.x

@tekton-robot
Copy link
Collaborator

@JeromeJu: #6791 failed to apply on top of branch "release-v0.41.x":

Applying: Fix bundle conversion for pipelineRef
.git/rebase-apply/patch:144: trailing whitespace.
  timeouts: 
.git/rebase-apply/patch:220: trailing whitespace.
  timeouts: 
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
M	pkg/apis/pipeline/v1beta1/pipelinerun_conversion_test.go
A	test/conversion_test.go
M	test/tektonbundles_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/tektonbundles_test.go
CONFLICT (content): Merge conflict in test/tektonbundles_test.go
CONFLICT (modify/delete): test/conversion_test.go deleted in HEAD and modified in Fix bundle conversion for pipelineRef. Version Fix bundle conversion for pipelineRef of test/conversion_test.go left in tree.
Auto-merging pkg/apis/pipeline/v1beta1/pipelinerun_conversion_test.go
Auto-merging pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix bundle conversion for pipelineRef
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.41.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JeromeJu
Copy link
Member Author

JeromeJu commented Jun 9, 2023

/cherry-pick release-v0.44.x

@tekton-robot
Copy link
Collaborator

@JeromeJu: #6791 failed to apply on top of branch "release-v0.44.x":

Applying: Fix bundle conversion for pipelineRef
.git/rebase-apply/patch:144: trailing whitespace.
  timeouts: 
.git/rebase-apply/patch:220: trailing whitespace.
  timeouts: 
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
M	pkg/apis/pipeline/v1beta1/pipelinerun_conversion_test.go
M	test/conversion_test.go
M	test/tektonbundles_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/tektonbundles_test.go
Auto-merging test/conversion_test.go
CONFLICT (content): Merge conflict in test/conversion_test.go
Auto-merging pkg/apis/pipeline/v1beta1/pipelinerun_conversion_test.go
Auto-merging pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix bundle conversion for pipelineRef
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.44.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lbernick
Copy link
Member

lbernick commented Jun 9, 2023

we'll also need to backport to v0.47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants